package com.briup.cloud.framework.resource.config;

import com.briup.cloud.framework.resource.web.interceptor.CurrentUserInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.format.Formatter;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.datetime.DateFormatter;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.Locale;

/**
 * @Author guomiao
 * @Date 2022/4/1 10:40
 */
@Slf4j
@Configuration
public class ResourceWebConfig implements WebMvcConfigurer {

    public ResourceWebConfig(){
       log.info("ResourceWebConfig对象创建");
    }

    @Autowired
    private CurrentUserInterceptor userInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userInterceptor).addPathPatterns("/**").excludePathPatterns("/uaa/login");
    }
}
